SET(TARGET_NAME nim_tools_cpp_wrapper)

PROJECT(${TARGET_NAME})

SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")

INCLUDE_DIRECTORIES(
    ${CMAKE_CURRENT_LIST_DIR}
    ${CMAKE_CURRENT_LIST_DIR}/..
)

FILE(GLOB_RECURSE NIM_TOOL_CPP_SOURCE *.h *.cpp)
FILE(GLOB_RECURSE NIM_AUDIO_SOURCE nim_audio_cpp.cpp nim_audio_cpp.h)

IF (NOT WIN32)
    LIST(REMOVE_ITEM NIM_TOOL_CPP_SOURCE ${NIM_AUDIO_SOURCE})
ENDIF ()

ADD_LIBRARY(${TARGET_NAME} STATIC ${NIM_TOOL_CPP_SOURCE})

SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES FOLDER "cpp_wrappers")
